﻿using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using SmartCity.Shared;
using Volo.Abp;
using Volo.Abp.AspNetCore.Mvc;

namespace CommonManagement
{
    /// <summary>
    /// 积分消息控制器
    /// </summary>
    [Authorize]
    [RemoteService]
    [Area("commonManagement")]
    [Route("api/commonManagement/notices")]
    public class NoticeController : AbpController, INoticeAppService
    {
        private readonly INoticeAppService _noticeAppService;

        public NoticeController(
            INoticeAppService noticeAppService)
        {
            _noticeAppService = noticeAppService;
        }

        // 分页列表
        [HttpGet]
        [Route("list")]
        public Task<ListResponse<NoticeDto>> PagedListAsync(PagedListRequest request)
        {
            return _noticeAppService.PagedListAsync(request);
        }
    }
}